<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Create Course</title>
</head>

<body>
	<h2 align="center">CREATE COURSE</h2>
    	<form id="createCourse" action="../viewCourses.php" method="post">
            <table bordercolor="#00CCCC" align="center">
                <tr>
                    <td>University name:</td>
                    <td><select name="User" id="User" style="width:150px;">
                    <?php
                    	mysql_set_charset('utf8');
						
						mysql_select_db($ini_array['dbname']);
						$select = "SELECT * FROM `universities`";
						$result = mysql_query($select);
						
						$numresult = mysql_num_rows($result);
						
						for($i=1; $i<=$numresult; $i++)
						{
							$row = mysql_fetch_array($result);
							echo "<option value='".stripslashes($row['universityName'])."'>".stripslashes($row['universityName'])."</option>";
						}
					?>
                    </select></td>
                </tr>
                <tr>
                    <td>Course Name:</td>
                    <td><input type="text" name="courseName" id="courseName" title="courseName" /></td>
                </tr>
                	<td>Course Description</td>
                    <td><textarea name="courseDescription" id="courseDescription" title="courseDescription"></textarea></td>
                </tr>
                <tr>
                	<td>Period</td>
                    <td><select id="periodTime" name="periodTime" style="width:150px;">
                    	<option value="1">1 day</option>
                        <option value="7">1 week</option>
                        <option value="30">1 month</option>
                        <option value="90">3 months</option>
                        <option value="365">1 year</option>
                    </select></td>
                </tr>
                <tr align="center">
                    <td colspan="2"><input type="submit" value="Khởi Tạo" style="background-color:#CCCCCC" /></td>
                </tr>
        	</table>
        </form>
</body>
</html>